﻿/***********************************************************************
 * <copyright file="NewsContent.cs" company="VidaGIS">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@vidagis.com or bichson2002@gmail.com
 * Website:
 * Create Date: Tuesday, November 25, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System;
using BusinessObjects;
using BusinessObjects.BusinessRules;

namespace BusinessNews
{
    /// <summary>
    /// NewsContent class
    /// </summary>
    public class NewsContent: BusinessObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="NewsContent"/> class.
        /// </summary>
        public NewsContent()
        {
            AddRule(new ValidateId("NewsId"));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="NewsContent"/> class.
        /// </summary>
        /// <param name="newsId">The news identifier.</param>
        /// <param name="languageId">The language identifier.</param>
        /// <param name="contents">The contents.</param>
        /// <param name="modifiedDate">The modified date.</param>
        public NewsContent(long newsId, short languageId, string contents, DateTime? modifiedDate)
            : this()
        {

            NewsId = newsId;
            LanguageId = languageId;
            Contents = contents;
            ModifiedDate = modifiedDate;
        }

        /// <summary>
        /// Gets or sets the news.
        /// </summary>
        /// <value>
        /// The news.
        /// </value>
        public News News { get; set; }

        /// <summary>
        /// Gets or sets the news identifier.
        /// </summary>
        /// <value>
        /// The news identifier.
        /// </value>
        public long NewsId { get; set; }

        /// <summary>
        /// Gets or sets the language identifier.
        /// </summary>
        /// <value>
        /// The language identifier.
        /// </value>
        public short LanguageId { get; set; }

        /// <summary>
        /// Gets or sets the contents.
        /// </summary>
        /// <value>
        /// The contents.
        /// </value>
        public string Contents { get; set; }

        /// <summary>
        /// Gets or sets the modified date.
        /// </summary>
        /// <value>
        /// The modified date.
        /// </value>
        public DateTime? ModifiedDate { get; set; }
    }
}
